package com.itheima;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

/**
 * @auther Macrydy
 * @date 2020/7/3 15:30
 */
public class Copy {
    public static void main(String[] args) {
        FileInputStream fis = null;
        FileOutputStream fos = null;
        try {
            fis = new FileInputStream("a.txt");
            fos = new FileOutputStream("day10IO\\b.txt");

            int by;
            while ((by=fis.read())!=-1){
                fos.write(by);
            }
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
        }

        try {
            fos.close();
            fis.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
